﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Model;
using Function;
using System.Data;
using System.Text;

namespace UI.Module.User
{
    public partial class InvestorPact : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string pactID = Request.QueryString["pactID"] ?? "";
                if (pactID!="")
                {
                    StringBuilder sb = new StringBuilder();
                    ST_InvestorPact pactModel = new ST_InvestorPactBLL().GetModel(pactID.ToInt32());
                    DataSet ds = new ST_InvestorPactPageBLL().GetList("PactID=" + pactID);

                    //合同标题
                    Label1.Text = pactModel.PactTitle;
                    //合同编号
                    Label2.Text = pactModel.PactCode;
                    //合同签订日期
                    Label3.Text = pactModel.SigningDate;
                    //合同执行日期
                    Label4.Text = pactModel.ExeDate;
                    //合同到期日期
                    Label5.Text = pactModel.ExeDate;
                    //内容
                    div_nr.InnerHtml = pactModel.PactContent;

                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow item in ds.Tables[0].Rows)
                        {
                            sb.Append("<a href='javascript:' onloadimg='" + item["PageURL"].ToString() + "'><img onload='ResizeImage(this,245,245)' src='" + item["PageURL"].ToString() + "'></a>");
                        }
                    }
                    div_img.InnerHtml = sb.ToString();
                }

            }
        }
    }
}